import Vue from 'vue'

Vue.directive('focus', (el, binding) => {
  if (binding.value) {
    setTimeout(() => {
      el.focus()
    }, 100)
  } else {
    el.blur()
  }
})